package com.lili.collection.file.config;

import com.lili.collection.core.config.InputConfig;
import com.lili.collection.core.domain.CollectCommonConfig;
import com.lili.collection.core.plugins.InputPlugin;
import com.lili.collection.core.support.ConfigFieldDef;
import com.lili.collection.file.plugins.FileInputPlugin;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 *描述: 文件配置
 *@date:2023/3/16  20:20
 *@author:lili
 */
@Slf4j
@Data
public class FileInputConfig extends CollectCommonConfig implements InputConfig {

    /**
     * 文件名
     */
    @ConfigFieldDef(type = ConfigFieldDef.Type.STRING, required = true)
    private String fileName;

    /**
     * 文件内容
     */
    private byte[] bytes;

    @Override
    public String getOffsetColumn(){
        return super.getOffsetColumn();
    }

    @Override
    public InputPlugin getPlugin() {
        return new FileInputPlugin();
    }
}